﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GastoObraListForm.aspx.cs" 
Inherits="UILGestion.ObraAdmin.OrdenCompras.GastoObraListForm" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="lib" %>
<%@ Register src="~/Control/menuObraCtrl.ascx" tagname="menuObraCtrl" tagprefix="uc1" %>

<%@ Register src="../../Control/GastoObraListGrid.ascx" tagname="GastoObraListGrid" tagprefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link href="../../../resources/css/main.css" rel="stylesheet" type="text/css" />
    
  <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/fonts.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/global.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/theme.css" />
    <style type="text/css">
        .style1
        {
            width: 139px;
        }
    </style>
</head>
<body >
   <form id="form1" runat="server">
    
    <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"
         EnablePartialRendering="true"
          EnableScriptGlobalization="true">
    </asp:ToolkitScriptManager>
    <uc1:menuObraCtrl ID="menuObraCtrl1" runat="server" />

 <asp:Panel ID="Panel1" runat="server" CssClass="Heading secTitle AreaHeading ms-crm-List-Header"
       >
  <asp:Label ID="Label1" runat="server" Text="LISTA GASTOS DE OBRA" style="font-size: large; color: #960818"></asp:Label>
 
</asp:Panel>
  <asp:Panel ID="PanelButtom" runat="server"
  BackColor="white">
 


 
    <table  width="100%">
          <tr>
              <td Width="800px">
              <asp:Panel ID="PanelwButtom" runat="server"   BackColor="white"  GroupingText="Filtros de busqueda">

              <table cellspacing="1" >
                  <tr>
                      <td align="right" width="150px">
                          Tipo Gasto Obra:</td>
                      <td width="140px" colspan="2">
                          <asp:DropDownList ID="gastoObraDDL" runat="server" Width="200px" AutoPostBack="true" >

                          </asp:DropDownList>
                      </td>
                      <td width="100px" align="right">
                          &nbsp;</td>
                      <td class="style1">
                          &nbsp;</td>
                      <td align="right" width="100px">
                          &nbsp;</td>
                      <td>
                          &nbsp;</td>
                  </tr>
                  <tr>
                      <td align="right" width="100px">
                          Num.Gasto Obra:&nbsp; </td>
                      <td width="140px" colspan="4">
                          <asp:TextBox ID="codigoTXT" runat="server" AutoPostBack="true" ></asp:TextBox>
                      </td>
                      <td align="right" width="100px">
                          &nbsp;</td>
                      <td width="140px">
                          &nbsp;</td>
                  </tr>
                  <tr>
                      <td align="right" width="100px">
                          Proveedor:</td>
                      <td colspan="4" width="140px">
                          <lib:Input ID="proveedortxt" runat="server" DataType="List"  AutoPostBack="true" 
                              Method="GetProveedor" Width="400px"></lib:Input>
                      </td>
                      <td align="right" width="100px">
                          &nbsp;</td>
                      <td width="140px">
                          &nbsp;</td>
                  </tr>
                  <tr>
                      <td align="right" width="100px">
                          Fecha Inicio:</td>
                      <td width="140px">
                          <cc1:PostTextBox ID="inicioDateTime" runat="server" Width="95px"></cc1:PostTextBox>
                          <asp:ImageButton ID="ImageButton2" runat="Server" 
                              AlternateText="Click aqui para mostrar calendario" 
                              ImageUrl="~/Images/month.gif" Width="16px" />
                          <asp:CalendarExtender ID="CalendarExtender1" runat="server" 
                              PopupButtonID="ImageButton2" TargetControlID="inicioDateTime">
                          </asp:CalendarExtender>
                      </td>
                      <td align="right" width="100px">
                          Fecha Fin:</td>
                      <td width="140px">
                          <cc1:PostTextBox ID="finDateTime" runat="server" Width="95px"></cc1:PostTextBox>
                          <asp:ImageButton ID="ImageButton1" runat="Server" 
                              AlternateText="Click aqui para mostrar calendario" 
                              ImageUrl="~/Images/month.gif" Width="16px" />
                          <asp:CalendarExtender ID="CalendarExtender2" runat="server" 
                              PopupButtonID="ImageButton1" TargetControlID="finDateTime">
                          </asp:CalendarExtender>
                      </td>
                      <td align="right" class="style1">
                          &nbsp;</td>
                      <td>
                          &nbsp;</td>
                      <td>
                      </td>
                  </tr>
                  <tr class="ms-crm-Form-Body" >
                      <td align="right" width="100px">
                          </td>
                      <td width="120px">
                          &nbsp;</td>
                      <td align="right" width="100px">
                          &nbsp;</td>
                      <td width="120px">
                          &nbsp;</td>
                      <td align="right" class="style1">
                          <asp:Button ID="refreshButton" runat="server" CssClass="ms-crm-List-Header" 
                              onclick="refreshButton_Click" Text="Actualizar" />
                      </td>
                      <td align="right">
                          <asp:Button ID="nuevoButton" runat="server" CssClass="ms-crm-List-Header" 
                               Text="Nuevo" onclick="nuevoButton_Click" Width="80px"  />
                      </td>
                      <td width="100px">
                          <asp:Button ID="ExportButton" runat="server" CssClass="ms-crm-List-Header" 
                              onclick="ExportButton_Click" Text="Exportar Excel Todo" />
                      </td>
                  </tr>
 </table>
 </asp:Panel>
 </td>
      <td>
                  &nbsp;</td>
          </tr>
      </table>
     <input id="idObra" type="hidden" runat="server" name="idObra"  />


     <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
     <ContentTemplate>
     <uc3:GastoObraListGrid ID="GastoObraListGrid1" runat="server"  DataSourceID="gastoObraListODS" />
        <asp:ObjectDataSource ID="gastoObraListODS"  runat="server"
             EnablePaging="True"
              SelectCountMethod="Countg" 
              SortParameterName="sortExpression"
             SelectMethod="getGastoObraList" 
             typeName="BOL.OrdenCompraBL" >
               <SelectParameters>
                <asp:querystringparameter  Name="idObra" Type="Int32" querystringfield="idObra"  />
                <asp:ControlParameter Name="numDocumentoStr" Type="String"   ControlID="codigoTXT"   />
                <asp:ControlParameter Name="proveedorStr" Type="String" ControlID="proveedortxt"  />
                <asp:ControlParameter Name="idTipoOrden" Type="Int32" ControlID="gastoObraDDL"  />
                <asp:ControlParameter Name="fechaInicio" Type="DateTime" ControlID="inicioDateTime"  />
                <asp:ControlParameter Name="fechaFin" Type="DateTime" ControlID="finDateTime"  />
                <asp:Parameter Name="startRowIndex" Type="Int32" />
                <asp:Parameter Name="maximumRows" Type="Int32" />
                <asp:Parameter Name="sortExpression" Type="String" />

                </SelectParameters>
              </asp:ObjectDataSource>
       
           
       
       </ContentTemplate>
       <Triggers>
       <asp:AsyncPostBackTrigger ControlID="refreshButton" /> 
        <asp:AsyncPostBackTrigger ControlID="gastoObraDDL" /> 
        <asp:AsyncPostBackTrigger ControlID="codigoTXT" /> 
        <asp:AsyncPostBackTrigger ControlID="proveedortxt" /> 
        
       
           </Triggers>
       
     </asp:UpdatePanel>
       </asp:Panel>
    </form>

</body>
</html>
